package com.mfangsoft.zhuangjialong.article.service.impl;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mfangsoft.zhuangjialong.app.applogin.mapper.CustomerEntityMapper;
import com.mfangsoft.zhuangjialong.article.mapper.ArticleCollectionEntityMapper;
import com.mfangsoft.zhuangjialong.article.mapper.ArticleEntityMapper;
import com.mfangsoft.zhuangjialong.article.mapper.ArticleEvaluationEntityMapper;
import com.mfangsoft.zhuangjialong.article.mapper.ArticleLikesEntityMapper;
import com.mfangsoft.zhuangjialong.article.model.ArticleDetailModel;
import com.mfangsoft.zhuangjialong.article.model.ArticleEntity;
import com.mfangsoft.zhuangjialong.article.service.HelperArticleService;
import com.mfangsoft.zhuangjialong.common.context.UserContext;
import com.mfangsoft.zhuangjialong.common.model.Page;
import com.mfangsoft.zhuangjialong.integration.user.mapper.UserEntityMapper;
import com.mfangsoft.zhuangjialong.integration.user.mapper.UserInfoEntityMapper;
import com.mfangsoft.zhuangjialong.integration.user.model.UserEntity;
import com.mfangsoft.zhuangjialong.integration.usermanage.mapper.BaseUserManageMapper;

@Service
public class HelperArticleServiceImpl implements HelperArticleService{

	@Autowired
	private ArticleEntityMapper articleEntityMapper;
	@Autowired
	private ArticleLikesEntityMapper articleLikesEntityMapper;
	@Autowired
	private ArticleCollectionEntityMapper articleCollectionEntityMapper;
	@Autowired
	private ArticleEvaluationEntityMapper articleEvaluationEntityMapper;
	@Autowired
	private UserEntityMapper userEntityMapper;
	@Autowired
	private UserInfoEntityMapper userInfoEntityMapper;
	@Autowired
	BaseUserManageMapper baseUserManageMapper;
	
	@Override
	public Page<ArticleDetailModel> queryNews(Page<ArticleDetailModel> page) {
		List<ArticleDetailModel> articles = articleEntityMapper.selectHelperArticlesForPage(page);
		page.setData(articles);
		return page;
	}
	
}
